//
//  ModelOfContinents.m
//  FreeTravel
//
//  Created by 徐康 on 16/9/7.
//  Copyright © 2016年 KX. All rights reserved.
//

#import "ModelOfContinents.h"
#import "ModelOfContinentsHot_country.h"
#import "ModelOfContinentsCountry.h"
@implementation ModelOfContinents
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    NSMutableArray *arr1 = [NSMutableArray array];
    NSMutableArray *arr2 = [NSMutableArray array];
    if ([key isEqualToString:@"id"]) {
        self.ID = [value integerValue];
    }if ([key isEqualToString:@"hot_country"]) {
        for (NSDictionary *dic in value) {
            ModelOfContinentsHot_country *model = [ModelOfContinentsHot_country modelWithDic:dic];
            [arr1 addObject:model];
        }
        self.hot_country = arr1;
    }if ([key isEqualToString:@"country"]) {
        for (NSDictionary *dic in value) {
            ModelOfContinentsCountry *model = [ModelOfContinentsCountry modelWithDic:dic];
            [arr2 addObject:model];
        }
        self.country = arr2;
 
    }

}
@end
